package demo.Polymorphism03;

public class Animal {
    private String name="Animal";

    public Animal() {
    }

    public Animal(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void eat() {
        System.out.println(name + " is eating");
    }
}
